import { Injectable } from '@nestjs/common';

@Injectable()
export class UploadService {
  //   async saveFile(blob: Blob, dataUrl: string): Promise<string> {
  // 在这里处理文件保存逻辑，例如：
  // const imgData = dataUrl.split(',')[1];
  // const buffer = await Buffer.from(new Buffer(imgData, 'base64'));
  // const fileName = 'test-image.jpg';
  // await fs.writeFileSync(`src/assets/images/${fileName}`, buffer);
  // return `/images/${fileName}`;
  //   }
}
